home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1987-11-18 | 13.0 KB | 391 lines |
- 1 '7/19/82 9:00pm
- 10 SCREEN 0,0,0:WIDTH 80:COLOR 3,0:KEY OFF:DEF SEG:DEFINT A-D:DEFSTR Z
- 20 YSCR=0:MYSCR=0:XLIN=1:XPOS=1:ON KEY(10) GOSUB 3300
- 30 GOSUB 3030:GOSUB 3450:GOSUB 2130
- 40 XLIN=1:XPOS=1:GOSUB 3350:FSTTME=1:NOSPR=1:PLAYED=1
- 50 XXFLG=0:PL1=1:GOSUB 2690:GOSUB 580:IF XXFLG THEN PL1=0:GOTO 80 ELSE GOSUB 150:GOSUB 270
- 60 IF INVD THEN GOSUB 2060:GOTO 50 ELSE NOPLAY=0
- 70 GOSUB 1250:GOSUB 1560:YSCR=YSCR+HOLDY:PL1=0:IF PLNO=0 THEN 3610
- 80 GOSUB 3820:FOR A=3 TO 6:LOCATE A,1:PRINT SPC(25):NEXT:LOCATE 3,1:PRINT "One Moment Please":PRINT "I am Thinking
- 90 GOSUB 760:IF INVD THEN GOSUB 1330:IF EMPT THEN GOSUB 3550:GOTO 50
- 100 IF INVD THEN CONO=CONO+1:MY$(CONO)=NEXTBN$:GOTO 90 ELSE NOPLAY=0
- 110 GOSUB 1290:GOSUB 1560:MYSCR=MYSCR+HOLDY:IF CONO=0 THEN 3610
- 120 COLOR 4,0:LOCATE 1,66:PRINT "Dominoes Played":COLOR 3,0
- 130 FOR A=1 TO 5:LOCATE A,1:PRINT SPC(25):NEXT
- 140 LOCATE 4,1:FOR A=1 TO CONO:PRINT "POINTPOINT":NEXT:GOSUB 3820:GOTO 50
- 150 DLN=15:DOM=40:DD=2:IF FSTTME THEN RETURN
- 160 DEF SEG:POKE 106,0:IF INKEY$<>"" THEN 160
- 170 LOCATE DLN,DOM,0:SAVE1=SCREEN(DLN,DOM):COLOR 31:PRINT CHR$(1);:COLOR 6
- 180 Z=INKEY$:IF Z="" THEN 180
- 190 IF LEN(Z)>1 THEN Z1=RIGHT$(Z,1) ELSE Z1=""
- 200 IF Z="8" OR Z1="H" THEN DLN=5 :DOM=40:DD=0
- 210 IF Z="6" OR Z1="M" THEN DLN=10:DOM=55:DD=1
- 220 IF Z="2" OR Z1="P" THEN DLN=15:DOM=40:DD=2
- 230 IF Z="4" OR Z1="K" THEN DLN=10:DOM=25:DD=3
- 240 LOCATE CSRLIN,POS(0)-1:PRINT CHR$(SAVE1);
- 250 IF Z<>CHR$(13) THEN 170
- 260 LOCATE CSRLIN,POS(0)-1:PRINT CHR$(SAVE1);:RETURN
- 270 INVD=0:OS=0:IS=0
- 280 IF FSTTME THEN 570
- 290 IF TBL$(DD)=" " THEN 370
- 300 ZL=LEFT$(TBL$(DD),1):ZLP=LEFT$(YOU$(PLA),1):ZRP=RIGHT$(YOU$(PLA),1)
- 310 IF ZL=ZLP THEN IS=1:GOTO 340
- 320 IF ZL=ZRP THEN OS=1:GOTO 340
- 330 INVD=1:RETURN
- 340 INVD=0
- 350 IF OS THEN TBL$(DD)=ZLP+ZRP:GOTO 480
- 360 IF IS THEN TBL$(DD)=ZRP+ZLP:GOTO 480
- 370 ZL=LEFT$(TBL$(4),1):ZR=RIGHT$(TBL$(4),1)
- 380 ZLP=LEFT$(YOU$(PLA),1):ZRP=RIGHT$(YOU$(PLA),1)
- 390 IF ZL=ZR THEN 450
- 400 IF DD=0 THEN IF ZL=ZLP THEN IS=1:GOTO 500
- 410 IF DD=0 THEN IF ZL=ZRP THEN OS=1:GOTO 500
- 420 IF DD=2 THEN IF ZR=ZLP THEN IS=1:GOTO 500
- 430 IF DD=2 THEN IF ZR=ZRP THEN OS=1:GOTO 500
- 440 GOTO 330
- 450 IF ZL=ZLP THEN IS=1:GOTO 500
- 460 IF ZL=ZRP THEN OS=1:GOTO 500
- 470 GOTO 330
- 480 CUR$=TBL$(DD)
- 490 GOSUB 2340:PLNO=PLNO-1:RETURN
- 500 IF LEFT$(TBL$(4),1)<>RIGHT$(TBL$(4),1) THEN 550
- 510 IF TBL$(1)=" " AND TBL$(2)=" " AND DD=1 THEN DD=2:GOTO 550
- 520 IF TBL$(3)=" " AND TBL$(2)=" " AND DD=3 THEN DD=2:GOTO 550
- 530 IF TBL$(1)=" " AND TBL$(0)=" " AND DD=1 THEN DD=0:GOTO 550
- 540 IF TBL$(3)=" " AND TBL$(0)=" " AND DD=3 THEN DD=0
- 550 IF OS THEN TBL$(DD)=YOU$(PLA):GOTO 480
- 560 IF IS THEN TBL$(DD)=ZRP+ZLP:GOTO 480
- 570 TBL$(4)=YOU$(PLA):CUR$=TBL$(4):GOTO 490
- 580 GOSUB 1770:IF XXFLG THEN RETURN
- 590 PLA=FIX(PLNO/2+0.5):DLN=19
- 600 IF PLNO AND 1 THEN DOM=40 ELSE DOM=35
- 610 IF PLNO>8 THEN DOM=35:PLA=4
- 620 DEF SEG:POKE 106,0:IF INKEY$<>"" THEN 620
- 630 LOCATE DLN,DOM,0:SAVE1=SCREEN(DLN,DOM):COLOR 26:PRINT CHR$(1);:COLOR 14
- 640 Z=INKEY$:IF Z="" THEN 640
- 650 IF LEN(Z)>1 THEN Z1=RIGHT$(ZDEFSTR1) ELSE Z1=""
- 660 IF Z="4" OR Z1="K" THEN DOM=DOM-10:PLA=PLA-1:GOTO 700
- 670 IF Z="6" OR Z1="M" THEN DOM=DOM+10:PLA=PLA+1:GOTO 700
- 680 IF Z<>CHR$(13) THEN 640
- 690 LOCATE CSRLIN,POS(0)-1:PRINT CHR$(SAVE1);:RETURN
- 700 IF PLA=0 THEN PLA=1:DOM=DOM+10:GOTO 750
- 710 IF PLA>PLNO THEN PLA=PLNO:DOM=DOM-10:GOTO 750
- 720 IF ONEROW GOTO 750
- 730 IF DOM>80 THEN DOM=DOM-80:DLN=DLN+3:GOTO 750
- 740 IF DOM<0 THEN DOM=DOM+80:DLN=DLN-3:GOTO 750
- 750 LOCATE CSRLIN,POS(0)-1:PRINT CHR$(SAVE1);:GOTO 630
- 760 IS=0:OS=0:INVD=0:PLFG=0:HOLD=0:HH1=0:HH2=0
- 770 FOR DD=3 TO 0 STEP-1
- 780 FOR PLA=1 TO CONO
- 790 ZLM=LEFT$(TBL$(4),1):ZRM=RIGHT$(TBL$(4),1)
- 800 ZL=LEFT$(TBL$(DD),1):ZLP=LEFT$(MY$(PLA),1):ZRP=RIGHT$(MY$(PLA),1)
- 810 IF TBL$(DD)=" " THEN 840
- 820 IF ZL=ZRP THEN OS=1:GOSUB 1160:GOTO 970
- 830 IF ZL=ZLP THEN IS=1:GOSUB 1160:GOTO 970 ELSE 970
- 840 IF ZLM<>ZRM THEN 930
- 850 IF ZLM=ZRP AND DD=0 THEN OS=1:GOSUB 1160:GOTO 970
- 860 IF ZLM=ZLP AND DD=0 THEN IS=1:GOSUB 1160:GOTO 970
- 870 IF ZLM=ZRP AND DD=2 THEN OS=1:GOSUB 1160:GOTO 970
- 880 IF ZLM=ZLP AND DD=2 THEN IS=1:GOSUB 1160:GOTO 970
- 890 IF ZLM=ZLP AND DD=1 THEN IS=1:GOSUB 1160:GOTO 970
- 900 IF ZLM=ZRP AND DD=1 THEN OS=1:GOSUB 1160:GOTO 970
- 910 IF ZLM=ZLP AND DD=3 THEN IS=1:GOSUB 1160:GOTO 970
- 920 IF ZLM=ZRP AND DD=3 THEN OS=1:GOSUB 1160:GOTO 970 ELSE 970
- 930 IF ZLM=ZLP AND DD=0 THEN IS=1:GOSUB 1160:GOTO 970
- 940 IF ZLM=ZRP AND DD=0 THEN OS=1:GOSUB 1160:GOTO 970
- 950 IF ZRM=ZLP AND DD=2 THEN IS=1:GOSUB 1160:GOTO 970
- 960 IF ZRM=ZRP AND DD=2 THEN OS=1:GOSUB 1160:GOTO 970
- 970 NEXT PLA
- 980 NEXT DD
- 990 IF LEFT$(TBL$(4),1)<>RIGHT$(TBL$(4),1) THEN 1020
- 1000 IF TBL$(1)=" " AND TBL$(2)=" " AND HH1 THEN HH2=2:GOTO 1020
- 1010 IF TBL$(1)=" " AND TBL$(2)=" " AND PLFG THEN DRH=2:GOTO 1020
- 1020 IF HH1 THEN PLA=HH1:DRH=HH2:GOTO 1050
- 1030 IF PLFG THEN PLA=PLFG:GOTO 1050
- 1040 INVD=1:RETURN
- 1050 ZLP1=LEFT$(MY$(PLA),1):ZRP1=RIGHT$(MY$(PLA),1)
- 1060 IF TBL$(DRH)<>" " THEN 1100
- 1070 ZL1=LEFT$(TBL$(4),1):ZR1=RIGHT$(TBL$(4),1)
- 1080 IF ZL1=ZR1 THEN 1110
- 1090 IF DRH=2 THEN SWAP ZL1,ZR1:GOTO 1110 ELSE 1110
- 1100 ZL1=LEFT$(TBL$(DRH),1):ZR1=RIGHT$(TBL$(DRH),1)
- 1110 IF ZL1=ZLP1 THEN IS=1:OS=0:GOTO 1130
- 1120 IF ZL1=ZRP1 THEN OS=1:IS=0:GOTO 1130
- 1130 IF IS THEN TBL$(DRH)=ZRP1+ZLP1:CUR$=TBL$(DRH):GOTO 1150
- 1140 IF OS THEN TBL$(DRH)=ZLP1+ZRP1:CUR$=TBL$(DRH):GOTO 1150
- 1150 GOSUB 2340:LOCATE 1,1:CONO=CONO-1:RETURN
- 1160 PLFG=PLA:DRH=DD
- 1170 FOR A=0 TO 4:SAV$(A)=TBL$(A):NEXT
- 1180 ZLP2=LEFT$(MY$(PLA),1):ZRP2=RIGHT$(MY$(PLA),1)
- 1190 IF IS THEN TBL$(DD)=ZRP2+ZLP2
- 1200 IF OS THEN TBL$(DD)=ZLP2+ZRP2
- 1210 GOSUB 1560
- 1220 IF HOLDY AND HOLD<=HOLDY THEN HOLD=HOLDY ELSE 1240
- 1230 HH1=PLA:HH2=DD
- 1240 FOR A=0 TO 4:TBL$(A)=SAV$(A):NEXT:RETURN
- 1250 FOR A=1 TO PLNO
- 1260 IF A<PLA THEN 1280
- 1270 YOU$(A)=YOU$(A+1)
- 1280 NEXT:RETURN
- 1290 FOR A=1 TO CONO
- 1300 IF A<PLA THEN 1320
- 1310 MY$(A)=MY$(A+1)
- 1320 NEXT:RETURN
- 1330 IF BNPTR=29 THEN EMPT=1:RETURN
- 1340 NEXTBN$=BONE$(BNPTR):BNPTR=BNPTR+1:RETURN
- 1350 IF NOSPR THEN 1360 ELSE RETURN
- 1360 IF LEFT$(TBL$(4),1)=RIGHT$(TBL$(4),1) THEN 1550
- 1370 FOR A=0 TO 3
- 1380 ZL=LEFT$(TBL$(A),1):ZR=RIGHT$(TBL$(A),1)
- 1390 IF TBL$(A)=" " THEN 1410
- 1400 IF ZL=ZR THEN 1420
- 1410 NEXT:RETURN
- 1420 IF A<>0 THEN 1460
- 1430 IF TBL$(2)<>" " THEN TBL$(4)=TBL$(0):TBL$(0)=" ":GOTO 1560
- 1440 SWAP TBL$(2),TBL$(4):SWAP TBL$(0),TBL$(4)
- 1450 TBL$(2)=RIGHT$(TBL$(2),1)+LEFT$(TBL$(2),1):GOTO 1560
- 1460 IF A<>1 THEN 1490
- 1470 IF TBL$(3)<>" " THEN TBL$(4)=TBL$(1):TBL$(1)=" ":GOTO 1560
- 1480 SWAP TBL$(3),TBL$(4):SWAP TBL$(1),TBL$(4):GOTO 1560
- 1490 IF A<>2 THEN 1520
- 1500 IF TBL$(0)<>" " THEN TBL$(4)=TBL$(2):TBL$(2)=" ":GOTO 1560
- 1510 SWAP TBL$(0),TBL$(4):SWAP TBL$(2),TBL$(4):GOTO 1560
- 1520 IF A<>3 THEN RETURN
- 1530 IF TBL$(1)=" " THEN SWAP TBL$(1),TBL$(4):SWAP TBL$(3),TBL$(4):GOTO 1560
- 1540 TBL$(4)=TBL$(3):TBL$(3)=" "
- 1550 NOSPR=0:RETURN
- 1560 HOLDY=0:FLAG1=0:PTOT=0
- 1570 PLM=VAL(LEFT$(TBL$(4),1)):PRM=VAL(RIGHT$(TBL$(4),1))
- 1580 IF FSTTME THEN 1750
- 1590 FOR A=0 TO 3
- 1600 PL=VAL(LEFT$(TBL$(A),1)):PR=VAL(RIGHT$(TBL$(A),1))
- 1610 IF TBL$(A)=" " THEN 1640
- 1620 PTOT=PTOT+PL:IF PL=PR THEN PTOT=PTOT+PR
- 1630 GOTO 1720
- 1640 IF PLM<>PRM THEN 1700
- 1650 IF FLAG1 THEN 1720
- 1660 IF A=0 OR A=2 THEN PTOT=PTOT+PRM+PLM:GOTO 1690
- 1670 IF TBL$(1)=" " THEN PTOT=PTOT+PLM
- 1680 IF TBL$(3)=" " THEN PTOT=PTOT+PLM
- 1690 FLAG1=1:GOTO 1720
- 1700 IF A=0 THEN PTOT=PTOT+PLM:GOTO 1720
- 1710 IF A=2 THEN PTOT=PTOT+PRM:GOTO 1720
- 1720 NEXT A
- 1730 IF PTOT/5=PTOT\5 THEN 1740 ELSE RETURN
- 1740 HOLDY=PTOT:RETURN
- 1750 A=PLM+PRM:IF A/5=A\5 THEN HOLDY=A ELSE HOLDY=0
- 1760 FSTTME=0:RETURN
- 1770 IF FSTTME THEN RETURN
- 1780 C=0
- 1790 FOR A=0 TO 3
- 1800 IF TBL$(A)=" " THEN 1860 ELSE C=C+1
- 1810 ZL=LEFT$(TBL$(A),1)
- 1820 FOR B=1 TO PLNO
- 1830 ZLP=LEFT$(YOU$(B),1):ZRP=RIGHT$(YOU$(B),1)
- 1840 IF ZL=ZLP OR ZL=ZRP THEN 2050
- 1850 NEXT B
- 1860 NEXT A
- 1870 IF C<4 THEN 1910
- 1880 GOSUB 1330:IF EMPT THEN XXFLG=1:GOSUB 3550:RETURN
- 1890 PLNO=PLNO+1:YOU$(PLNO)=NEXTBN$
- 1900 GOSUB 2690:GOTO 1780
- 1910 ZL=LEFT$(TBL$(4),1):ZR=RIGHT$(TBL$(4),1)
- 1920 IF ZL=ZR THEN 1980
- 1930 FOR A=1 TO PLNO
- 1940 ZLP=LEFT$(YOU$(A),1):ZRP=RIGHT$(YOU$(A),1)
- 1950 IF TBL$(0)=" " AND (ZL=ZLP OR ZL=ZRP) THEN 2050
- 1960 IF TBL$(2)=" " AND (ZR=ZLP OR ZR=ZRP) THEN 2050
- 1970 NEXT A:GOTO 1880
- 1980 FOR B=0 TO 3
- 1990 IF TBL$(B)<>" " THEN 2040
- 2000 FOR A=1 TO PLNO
- 2010 ZLP=LEFT$(YOU$(A),1):ZRP=RIGHT$(YOU$(A),1)
- 2020 IF ZL=ZLP OR ZL=ZRP THEN 2050
- 2030 NEXT A
- 2040 NEXT B:GOTO 1880
- 2050 RETURN
- 2060 LOCATE 25,1:PRINT SPC(79);:COLOR 31,0:LOCATE 25,25
- 2070 PRINT "Invalid Move. Please Try Again.";:COLOR 3,0:INVD=0:GOTO 2080
- 2080 DEF SEG:POKE 106,0:IF INKEY$<>"" THEN 2080
- 2090 FOR XX=1 TO 1000
- 2100 Z=INKEY$:IF Z<>"" THEN 2120
- 2110 NEXT
- 2120 LOCATE 25,1:PRINT SPC(79);:RETURN
- 2130 FOR A=0 TO 6:READ DT$(A):NEXT
- 2140 DATA " "," <UNK! {00F9}> ",". <UNK! {00F9}>",".<UNK! {00F9}>.",": :",":<UNK! {00F9}>:",":::"
- 2150 RANDOMIZE(VAL(RIGHT$(TIME$,2)))
- 2160 DIM PLD$(28),BONE$(28),MY$(16),YOU$(16):C=0:B=-1
- 2170 FOR A=1 TO 28
- 2180 B=B+1
- 2190 BONE$(A)=RIGHT$(STR$(B),1)+RIGHT$(STR$(C),1)
- 2200 IF B=6 THEN B=C:C=C+1
- 2210 NEXT
- 2220 FOR A=1 TO 28
- 2230 B=FIX(RND*28)+1:C=FIX(RND*28)+1:IF B=C THEN 2230
- 2240 SWAP BONE$(B),BONE$(C)
- 2250 NEXT
- 2260 FOR A=0 TO 4:TBL$(A)=" ":NEXT
- 2270 B=0
- 2280 FOR A=1 TO 13 STEP 2
- 2290 B=B+1
- 2300 YOU$(B)=BONE$(A)
- 2310 MY$(B)=BONE$(A+1)
- 2320 NEXT:PLNO=7:CONO=7:BNPTR=15
- 2330 RETURN
- 2340 CLS:GOSUB 1350:GOSUB 3350:CUR$=LEFT$(CUR$,1)+":"+RIGHT$(CUR$,1)
- 2350 PLD$(PLAYED)=CUR$
- 2360 PLAYED=PLAYED+1
- 2370 FOR SLOC=0 TO 3
- 2380 IF TBL$(SLOC)=" " THEN 2410
- 2390 ZL=LEFT$(TBL$(SLOC),1):ZR=RIGHT$(TBL$(SLOC),1)
- 2400 IF ZL<>ZR THEN GOSUB 2510 ELSE GOSUB 2450
- 2410 NEXT
- 2420 ZL=LEFT$(TBL$(4),1):ZR=RIGHT$(TBL$(4),1)
- 2430 IF ZL=ZR THEN GOSUB 2500 ELSE GOSUB 2560
- 2440 RETURN
- 2450 ON SLOC+1 GOSUB 2460,2480,2490,2470,2500:RETURN
- 2460 SLN=6:HS=36:LFT=VAL(ZL):RHT=VAL(ZR):GOSUB 2640:RETURN
- 2470 SLN=8:HS=28:TOP=VAL(ZL):BOT=VAL(ZR):GOSUB 2570:RETURN
- 2480 SLN=8:HS=50:TOP=VAL(ZL):BOT=VAL(ZR):GOSUB 2570:RETURN
- 2490 SLN=12:HS=36:LFT=VAL(ZL):RHT=VAL(ZR):GOSUB 2640:RETURN
- 2500 SLN=9:HS=36:LFT=VAL(ZL):RHT=VAL(ZR):GOSUB 2640:RETURN
- 2510 ON SLOC+1 GOSUB 2520,2540,2550,2530,2560:RETURN
- 2520 SLN=3:HS=38:TOP=VAL(ZR):BOT=VAL(ZL):GOSUB 2570:RETURN
- 2530 SLN=9:HS=26:LFT=VAL(ZR):RHT=VAL(ZL):GOSUB 2640:RETURN
- 2540 SLN=9:HS=46:LFT=VAL(ZL):RHT=VAL(ZR):GOSUB 2640:RETURN
- 2550 SLN=13:HS=38:TOP=VAL(ZL):BOT=VAL(ZR):GOSUB 2570:RETURN
- 2560 SLN=8:HS=38:TOP=VAL(ZR):BOT=VAL(ZL):GOSUB 2570:RETURN
- 2570 COLOR 6,0:LOCATE SLN+0,HS:PRINT "VARPTRSOUNDSOUNDSOUNDCOLOR"
- 2580 LOCATE SLN+1,HS:PRINT "CALL CALL"
- 2590 LOCATE SLN+2,HS:PRINT "BLOADSOUNDSOUNDSOUND<0xB4!>"
- 2600 LOCATE SLN+3,HS:PRINT "CALL CALL"
- 2610 LOCATE SLN+4,HS:PRINT "CLSSOUNDSOUNDSOUND'":COLOR 15,0
- 2620 LOCATE SLN+1,HS+1:PRINT DT$(BOT)
- 2630 LOCATE SLN+3,HS+1:PRINT DT$(TOP):COLOR 7,0:RETURN
- 2640 COLOR 6,0:LOCATE SLN+0,HS:PRINT "VARPTRSOUNDSOUNDSOUNDBSAVESOUNDSOUNDSOUNDCOLOR"
- 2650 LOCATE SLN+1,HS:PRINT "CALL CALL CALL"
- 2660 LOCATE SLN+2,HS:PRINT "CLSSOUNDSOUNDSOUNDMOTORSOUNDSOUNDSOUND'":COLOR 15,0
- 2670 LOCATE SLN+1,HS+1:PRINT DT$(RHT)
- 2680 LOCATE SLN+1,HS+5:PRINT DT$(LFT):COLOR 7,0:RETURN
- 2690 ONEROW=1
- 2700 LOCATE ,,0
- 2710 SLN=19
- 2720 HS=(80-(10*PLNO))\2+1
- 2730 IF HS<1 THEN HS=1
- 2740 FOR I=SLN TO 6+SLN-1
- 2750 LOCATE I,1:PRINT SPC(79);
- 2760 NEXT I
- 2770 FOR A=1 TO PLNO:COLOR 14,0
- 2780 LOCATE SLN,HS: PRINT "VARPTRSOUNDSOUNDSOUNDBSAVESOUNDSOUNDSOUNDCOLOR";
- 2790 LOCATE SLN+1,HS:PRINT "CALL CALL CALL";
- 2800 LOCATE SLN+2,HS:PRINT "CLSSOUNDSOUNDSOUNDMOTORSOUNDSOUNDSOUND'";
- 2810 HS=HS+10
- 2820 IF HS>80 THEN SLN=SLN+3:HS=1:ONEROW=0
- 2830 NEXT
- 2840 LOCATE 24,1,O:PRINT "Use Cursor Arrows To Choose And Position Dominoe Strike Enter Key When Ready";
- 2850 SLN=19
- 2860 HS=((80-(10*PLNO))\2)+2
- 2870 IF HS<1 THEN HS=2
- 2880 FOR A=1 TO PLNO:COLOR 15,0
- 2890 ON VAL(LEFT$(YOU$(A),1))+1 GOSUB 2960,2970,2980,2990,3000,3010,3020
- 2900 HS=HS+4
- 2910 ON VAL(RIGHT$(YOU$(A),1))+1 GOSUB 2960,2970,2980,2990,3000,3010,3020
- 2920 HS=HS+6
- 2930 IF HS>80 THEN SLN=SLN+3:HS=2
- 2940 NEXT
- 2950 COLOR 7,0:RETURN
- 2960 LOCATE SLN+1,HS:PRINT DT$(0):RETURN
- 2970 LOCATE SLN+1,HS:PRINT DT$(1):RETURN
- 2980 LOCATE SLN+1,HS:PRINT DT$(2):RETURN
- 2990 LOCATE SLN+1,HS:PRINT DT$(3):RETURN
- 3000 LOCATE SLN+1,HS:PRINT DT$(4):RETURN
- 3010 LOCATE SLN+1,HS:PRINT DT$(5):RETURN
- 3020 LOCATE SLN+1,HS:PRINT DT$(6):RETURN
- 3030 CLS:COLOR 6,0:GOSUB 3430
- 3040 LOCATE 1,1:PRINT STRING$(80,219)
- 3050 FOR A=2 TO 22:LOCATE A,1:PRINT "CSRLIN":LOCATE A,80:PRINT "CSRLIN":NEXT
- 3060 LOCATE 23,1:PRINT STRING$(80,219);
- 3070 LOCATE 3,33:COLOR 11,0:PRINT "D O M I N O E S
- 3080 COLOR 15,0:LOCATE 8,25:PRINT "Would You Like instructions? <Y/N>"
- 3090 GOSUB 3380:IF Z="N" THEN CLS:RETURN ELSE IF Z<>"Y" THEN 3090
- 3100 COLOR 3,0:LOCATE 4,19:PRINT "This is single spinner Dominoes, that is you
- 3110 LOCATE 5,19:PRINT "can only play in any direction off the first
- 3120 LOCATE 6,19:PRINT "spinner or double dominoe (1:1,2:2,3:3, etc).
- 3130 LOCATE 7,19:PRINT "The object of the game is to score points in
- 3140 LOCATE 8,19:PRINT "multiples of `5' by adding the total of all
- 3150 LOCATE 9,19:PRINT "open ends of the playing board. You can score
- 3160 LOCATE 10,19:PRINT "points only if the game board total is five
- 3170 LOCATE 11,19:PRINT "or a multiple of five. You may start each new
- 3180 LOCATE 12,19:PRINT "hand by playing the first dominoe. If the
- 3190 LOCATE 13,19:PRINT "total of both ends equals five or ten, you
- 3200 LOCATE 14,19:PRINT "score that number of points. From that point
- 3210 LOCATE 15,19:PRINT "on, you and the computer build onto the ends
- 3220 LOCATE 16,19:PRINT "trying to score points. If no dominoe end
- 3230 LOCATE 17,19:PRINT "in your hand matches an open end on the board,
- 3240 LOCATE 18,19:PRINT "the computer will draw from the boneyard. If
- 3250 LOCATE 19,19:PRINT "the boneyard is empty, the other player may
- 3260 LOCATE 20,19:PRINT "play again. Use the Cursor Arrows and Enter
- 3270 LOCATE 21,19:PRINT "Key to select and play your dominoes.
- 3280 LOCATE 25,25:COLOR 15,0:PRINT "Strike Any Key To Continue";
- 3290 Z=INKEY$:IF Z="" THEN 3290 ELSE CLS:RETURN
- 3300 KEY(10) OFF:XLIN=CSRLIN:XPOS=POS(0):LOCATE 25,1:PRINT SPC(79);
- 3310 LOCATE 25,21:PRINT "Do You Wish To Leave This Game? <Y/N>";
- 3320 Z=INKEY$:IF Z="" THEN 3320
- 3330 IF Z="y" OR Z="Y" THEN RUN"menu
- 3340 IF Z<>"n" AND Z<>"N" THEN 3320
- 3350 LOCATE 25,1:PRINT SPC(79);:LOCATE 25,24:COLOR 0,7
- 3360 PRINT " Strike <F10> To Leave This Game ";:COLOR 7,0:LOCATE XLIN,XPOS,0
- 3370 KEY(10) ON:RETURN
- 3380 DEF SEG:POKE 106,0:IF INKEY$<>"" THEN 3380
- 3390 Z=INKEY$:IF Z="" THEN 3390
- 3400 IF Z<"a" OR Z>"z" THEN 3420
- 3410 Z=CHR$(ASC(Z)-32)
- 3420 RETURN
- 3430 FOR A=1 TO 9:ON KEY(A) GOSUB 3440:KEY(A) ON:NEXT
- 3440 RETURN
- 3450 CLS
- 3460 LOCATE 6,30:COLOR 0,7:PRINT " A ";:COLOR 3,0:PRINT" Play To 100 Points"
- 3470 LOCATE 8,30:COLOR 0,7:PRINT " B ";:COLOR 3,0:PRINT" Play To 250 Points"
- 3480 LOCATE 10,30:COLOR 0,7:PRINT " C ";:COLOR 3,0:PRINT" Play To 500 Points"
- 3490 COLOR 3,0:LOCATE 4,25:PRINT"Please Choose A Game <A> <B> or <C>"
- 3500 Z=INKEY$:IF Z="" THEN 3500
- 3510 IF Z="A" OR Z="a" THEN GAME=100:GOTO 3540
- 3520 IF Z="B" OR Z="b" THEN GAME=250:GOTO 3540
- 3530 IF Z="C" OR Z="c" THEN GAME=500:GOTO 3540 ELSE 3500
- 3540 CLS:RETURN
- 3550 NOPLAY=NOPLAY+1
- 3560 LOCATE 4,1:COLOR 15,0
- 3570 PRINT "The Bone Yard Is Empty":IF PL1 THEN 3590
- 3580 PRINT "And I Have No Play":PRINT "I Lose My Turn":GOTO 3600
- 3590 PRINT "Sorry, You Have No Play":PRINT "So You Lose Your Turn":GOTO 3600
- 3600 IF NOPLAY=2 THEN 3610 ELSE FOR AI=1 TO 3500:NEXT:RETURN
- 3610 FOR A=1 TO 3000:NEXT:TOT=0:IF PLNO THEN IF CONO THEN 3620 ELSE 3660
- 3620 FOR A=1 TO CONO
- 3630 TOT=TOT+VAL(LEFT$(MY$(A),1))+VAL(RIGHT$(MY$(A),1))
- 3640 NEXT:REMA=TOT MOD 5:TOT=TOT\5:TOT=TOT*5:IF REMA>2 THEN TOT=TOT+5
- 3650 YSCR=YSCR+TOT:IF PLNO THEN 3660 ELSE 3700
- 3660 TOT=0:FOR A=1 TO PLNO
- 3670 TOT=TOT+VAL(LEFT$(YOU$(A),1))+VAL(RIGHT$(YOU$(A),1))
- 3680 NEXT:REMA=TOT MOD 5:TOT=TOT\5:TOT=TOT*5:IF REMA>2 THEN TOT=TOT+5
- 3690 MYSCR=MYSCR+TOT
- 3700 CLS:LOCATE 4,29:PRINT "Your Total Score Is"YSCR
- 3710 LOCATE 5,30:PRINT "My Total Score Is"MYSCR:IF MYSCR>=GAME AND MYSCR=YSCR THEN 3790
- 3720 IF YSCR>=GAME THEN IF YSCR>MYSCR THEN 3770 ELSE 3780
- 3730 IF MYSCR>=GAME THEN IF YSCR<MYSCR THEN 3780 ELSE 3770
- 3740 LOCATE 7,28:PRINT "One Moment Please, While
- 3750 LOCATE 8,28:PRINT "I Reshuffle The BoneYard
- 3760 EMPT=0:C=0:B=-1:GOSUB 2170:FOR A=1 TO 7000:NEXT:CLS:GOTO 40
- 3770 LOCATE 6,36:PRINT "You Win":GOTO 3800
- 3780 LOCATE 6,37:PRINT "I Win":GOTO 3800
- 3790 LOCATE 6,31:PRINT "The Game Is A Tie"
- 3800 LOCATE 10,23:PRINT "Would You Like To Play Again? <Y/N>"
- 3810 GOSUB 3380:IF Z="Y" THEN RUN ELSE IF Z="N" THEN RUN"menu" ELSE 3810
- 3820 COLOR 4,0:LOCATE 1,66:PRINT "Dominoes Played":COLOR 3,0
- 3830 FOR A=0 TO PLAYED-1
- 3840 IF A<17 THEN LOCATE A+2,71:PRINT PLD$(A);
- 3850 IF A>16 THEN LOCATE A-14,76:PRINT PLD$(A);
- 3860 NEXT
- 3870 LOCATE 2,1:PRINT"Your Score Is"YSCR;:COLOR 7,0
- 3880 COLOR 2,0:LOCATE 1,1:PRINT"My Score Is"MYSCR;
- 3890 RETURN
-